use "main_recoded.dta"

*set your directory
*if you don't have outreg 2:
*ssc install outreg2

*h1

reg electionconfidenceindex factchecks, vce(hc2)

outreg2 using "table_h1.tex", tex replace ctitle(Model 1) label

reg electionconfidenceindex factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates , vce(hc2)

outreg2 using table_h1.tex, tex append

*h1 oprobit

oprobit electionconfidenceindex factchecks

outreg2 using "table_h1_oprobit.tex", tex replace ctitle(Model 1) label

oprobit electionconfidenceindex factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates 

outreg2 using table_h1_oprobit.tex, tex append


*RQ1
reg verifiedvoted factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates if alreadyvoted==0, vce(hc2)

outreg2 using "table_rq1.tex", tex replace ctitle(Model 1) label

reg intentiontovote factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates, vce(hc2)

outreg2 using table_rq1.tex, tex append

*RQ3


reg electionpolicyindex factchecks, vce(hc2)

outreg2 using "table_rq3.tex", tex replace ctitle(Effects on Policy Views) label

reg electionpolicyindex factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates, vce(hc2)

outreg2 using table_rq3.tex, tex append

*RQ4
logit WillVoteforTrump factchecks if alreadyvoted==0
outreg2 using "table_rq4_trump.tex", tex replace ctitle(Model 1) label

logit WillVoteforTrump factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq4_trump.tex, tex append

reg WillVoteforTrump factchecks if alreadyvoted==0
outreg2 using table_rq4_trump.tex, tex append

reg WillVoteforTrump factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq4_trump.tex, tex append


logit WillVoteforBiden factchecks if alreadyvoted==0
outreg2 using "table_rq4_biden.tex", tex replace ctitle(Model 1) label

logit WillVoteforBiden factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq4_biden.tex, tex append

reg WillVoteforBiden factchecks if alreadyvoted==0
outreg2 using table_rq4_biden.tex, tex append

reg WillVoteforBiden factchecks college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq4_biden.tex, tex append

*Tests of RQ5a - Partisanship interactions (Leaners as partisans)
reg electionconfidenceindex i.factchecks##c.pid7recodedleanersasparty , vce(hc2)

reg electionconfidenceindex i.factchecks##c.pid7recodedleanersasparty college4yrdegreeorabove age5cat male  ideo5recoded nonwhite mediaindex battlegroundstates , vce(hc2)


*Tests of RQ5b (Leaners as partisans)
reg verifiedvoted i.factchecks##c.pid7recodedleanersasparty if alreadyvoted==0, vce(hc2)
reg verifiedvoted i.factchecks##c.pid7recodedleanersasparty college4yrdegreeorabove age5cat male  ideo5recoded nonwhite mediaindex battlegroundstates if alreadyvoted==0, vce(hc2)

reg intentiontovote i.factchecks##c.pid7recodedleanersasparty, vce(hc2)
reg intentiontovote i.factchecks##c.pid7recodedleanersasparty college4yrdegreeorabove age5cat male  ideo5recoded nonwhite mediaindex battlegroundstates, vce(hc2)


*Tests of RQ5c (Leaners as partisans)
reg electionpolicyindex i.factchecks##c.pid7recodedleanersasparty , vce(hc2)
outreg2 using "table_rq5c_policy.tex", tex replace ctitle(RQ5 (Policy)) label

reg electionpolicyindex i.factchecks##c.pid7recodedleanersasparty college4yrdegreeorabove age5cat male  ideo5recoded nonwhite mediaindex battlegroundstates , vce(hc2)
outreg2 using table_rq5c_policy.tex, tex append

reg electionconfidenceindex i.factchecks##c.mediaindex , vce(hc2)
outreg2 using "table_rq5c_confidence.tex", tex replace ctitle(RQ5 (Confidence)) label

reg electionconfidenceindex i.factchecks##c.mediaindex college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded battlegroundstates , vce(hc2)
outreg2 using table_rq5c_confidence.tex, tex append

reg verifiedvoted i.factchecks##c.mediaindex if alreadyvoted==0, vce(hc2)
outreg2 using "table_rq5c_voted.tex", tex replace ctitle(RQ5 (Voted)) label

reg verifiedvoted i.factchecks##c.mediaindex college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded battlegroundstates if alreadyvoted==0, vce(hc2)
outreg2 using table_rq5c_voted.tex, tex append

reg intentiontovote i.factchecks##c.mediaindex, vce(hc2)
outreg2 using "table_rq5c_intention.tex", tex replace ctitle(RQ5 (Intention)) label

reg intentiontovote i.factchecks##c.mediaindex college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded battlegroundstates, vce(hc2)
outreg2 using table_rq5c_intention.tex, tex append


reg WillVoteforTrump i.factchecks##c.mediaindex if alreadyvoted==0
outreg2 using "table_rq5c_trump.tex", tex replace ctitle(RQ5 (Trump)) label

reg WillVoteforTrump i.factchecks##c.mediaindex college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded battlegroundstates if alreadyvoted==0
outreg2 using table_rq5c_trump.tex, tex append
 
 
reg WillVoteforBiden i.factchecks##c.mediaindex if alreadyvoted==0
outreg2 using "table_rq5c_biden.tex", tex replace ctitle(RQ5 (Biden)) label

reg WillVoteforBiden i.factchecks##c.mediaindex college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded battlegroundstates if alreadyvoted==0
outreg2 using table_rq5c_biden.tex, tex append

reg electionpolicyindex i.factchecks##c.mediaindex, vce(hc2)
outreg2 using "table_rq5c_policy.tex", tex replace ctitle(RQ5 (Policy)) label

reg electionpolicyindex i.factchecks##c.mediaindex college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded battlegroundstates, vce(hc2)
outreg2 using table_rq5c_policy.tex, tex append


*Tests of RQ6 - Political participation index interactions
reg electionconfidenceindex i.factchecks##c.politicalpartadditive, vce(hc2)
outreg2 using "table_rq6_confidence_part.tex", tex replace ctitle(RQ6 (Confidence)) label

reg electionconfidenceindex i.factchecks##c.politicalpartadditive college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates , vce(hc2)
outreg2 using table_rq6_confidence_part.tex, tex append

reg verifiedvoted i.factchecks##c.politicalpartadditive if alreadyvoted==0, vce(hc2)
outreg2 using "table_rq6_voted_part.tex", tex replace ctitle(RQ6 (Voted)) label

reg verifiedvoted i.factchecks##c.politicalpartadditive college4yrdegreeorabove age5cat male ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0, vce(hc2)
outreg2 using table_rq6_voted_part.tex, tex append

reg intentiontovote i.factchecks##c.politicalpartadditive, vce(hc2)
outreg2 using "table_rq6_intention_part.tex", tex replace ctitle(RQ6 (Intention)) label

reg intentiontovote i.factchecks##c.politicalpartadditive college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates, vce(hc2)
outreg2 using table_rq6_intention_part.tex, tex append

reg WillVoteforTrump i.factchecks##c.politicalpartadditive if alreadyvoted==0
outreg2 using "table_rq6_trump_part.tex", tex replace ctitle(RQ6 (Trump)) label

reg WillVoteforTrump i.factchecks##c.politicalpartadditive college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq6_trump_part.tex_part, tex append

reg WillVoteforBiden i.factchecks##c.politicalpartadditive if alreadyvoted==0
outreg2 using "table_rq6_biden_part.tex", tex replace ctitle(RQ6 (Biden)) label

reg WillVoteforBiden i.factchecks##c.politicalpartadditive college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq6_biden_part.tex_part, tex append

reg electionpolicyindex i.factchecks##c.politicalpartadditive, vce(hc2)
outreg2 using "table_rq6_policy.tex_part", tex replace ctitle(RQ6 (Policy)) label

reg electionpolicyindex i.factchecks##c.politicalpartadditive college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates, vce(hc2)
outreg2 using table_rq6_policy.tex_part, tex append

*Tests of RQ6 - Political interest index interactions
reg electionconfidenceindex i.factchecks##c.politicalinterest, vce(hc2)
outreg2 using "table_rq6_confidence_int.tex", tex replace ctitle(RQ6 (Confidence)) label

reg electionconfidenceindex i.factchecks##c.politicalinterest college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates , vce(hc2)
outreg2 using table_rq6_confidence_int.tex, tex append

reg verifiedvoted i.factchecks##c.politicalinterest if alreadyvoted==0, vce(hc2)
outreg2 using "table_rq6_voted_int.tex", tex replace ctitle(RQ6 (Voted)) label

reg verifiedvoted i.factchecks##c.politicalinterest college4yrdegreeorabove age5cat male ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0, vce(hc2)
outreg2 using table_rq6_voted_int.tex, tex append

reg intentiontovote i.factchecks##c.politicalinterest, vce(hc2)
outreg2 using "table_rq6_intention_int.tex", tex replace ctitle(RQ6 (Intention)) label

reg intentiontovote i.factchecks##c.politicalinterest college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates, vce(hc2)
outreg2 using table_rq6_intention_int.tex, tex append

reg WillVoteforTrump i.factchecks##c.politicalinterest if alreadyvoted==0
outreg2 using "table_rq6_trump_int.tex", tex replace ctitle(RQ6 (Trump)) label

reg WillVoteforTrump i.factchecks##c.politicalinterest college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq6_trump_int.tex, tex append

reg WillVoteforBiden i.factchecks##c.politicalinterest if alreadyvoted==0
outreg2 using "table_rq6_biden_int.tex", tex replace ctitle(RQ6 (Biden)) label

reg WillVoteforBiden i.factchecks##c.politicalinterest college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq6_biden_int.tex, tex append

reg electionpolicyindex i.factchecks##c.politicalinterest, vce(hc2)
outreg2 using "table_rq6_policy_int.tex", tex replace ctitle(RQ6 (Policy)) label

reg electionpolicyindex i.factchecks##c.politicalinterest college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates, vce(hc2)
outreg2 using table_rq6_policy_int.tex, tex append


*Tests of RQ7 - Political efficacy interactions
reg electionconfidenceindex i.factchecks##c.politicalefficacy, vce(hc2)
outreg2 using "table_rq7_confidence.tex", tex replace ctitle(RQ7 (Confidence)) label

reg electionconfidenceindex i.factchecks##c.politicalefficacy college4yrdegreeorabove age5cat male pid7recoded ideo5recoded nonwhite mediaindex battlegroundstates , vce(hc2)
outreg2 using table_rq7_confidence.tex, tex append

reg verifiedvoted i.factchecks##c.politicalefficacy if alreadyvoted==0, vce(hc2)
outreg2 using "table_rq7_voted.tex", tex replace ctitle(RQ7 (Voted)) label

reg verifiedvoted i.factchecks##c.politicalefficacy college4yrdegreeorabove age5cat male ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0, vce(hc2)
outreg2 using table_rq7_voted.tex, tex append

reg intentiontovote i.factchecks##c.politicalefficacy, vce(hc2)
outreg2 using "table_rq7_intention.tex", tex replace ctitle(RQ7 (Intention)) label

reg intentiontovote i.factchecks##c.politicalefficacy college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates, vce(hc2)
outreg2 using table_rq7_intention.tex, tex append

reg WillVoteforTrump i.factchecks##c.politicalefficacy if alreadyvoted==0
outreg2 using "table_rq7_trump.tex", tex replace ctitle(RQ7 (Trump)) label

reg WillVoteforTrump i.factchecks##c.politicalefficacy college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq7_trump.tex, tex append
 
reg WillVoteforBiden i.factchecks##c.politicalefficacy if alreadyvoted==0
outreg2 using "table_rq7_biden.tex", tex replace ctitle(RQ7 (Biden)) label

reg WillVoteforBiden i.factchecks##c.politicalefficacy college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates if alreadyvoted==0
outreg2 using table_rq7_biden.tex, tex append

reg electionpolicyindex i.factchecks##c.politicalefficacy, vce(hc2)
outreg2 using "table_rq7_policy.tex", tex replace ctitle(RQ7 (Policy)) label

reg electionpolicyindex i.factchecks##c.politicalefficacy college4yrdegreeorabove age5cat male  ideo5recoded nonwhite pid7recoded mediaindex battlegroundstates, vce(hc2)
outreg2 using table_rq7_policy.tex, tex append


